﻿using FreesenseSubAIS;
using FreesenseSubAIS.ImageProcess;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FreesenseSubAIS.Core
{
    [Serializable]
    [Description("图片工程参数")]
    [TypeConverter(typeof(ExpandableObjectConverter))]
    [InspGroup("ParamProject")]
    public class ProjectParam
    {
        private string _name;
        private string _elename;
        private List<AlgParameter> _paramList;
        private LightsInten _intensity;
        private DelayTime _delaytime;
        public ProjectParam()
        { }
        public ProjectParam(string productname)
        {
            this._name = productname;
        }
        [Browsable(false), Description("参数列表"), Category("图片参数列表"), DisplayName("参数列表")]// 
        public List<AlgParameter> ParamList
        {
            get
            {
                if (_paramList == null)
                    _paramList = new List<AlgParameter>();
                return _paramList;
            }
            set
            {
                if (value != null)
                {
                    value = _paramList;
                }
            }
        }
        [Browsable(true), Category("UserSetting"), Description("型号名称"), DisplayName("型号名称")]
        public string ProductName
        {
            get { return _name; }
            set { _name = value; }
        }
        [Browsable(true), Category("UserSetting"), Description("电测机型号名称"), DisplayName("电测机型号名称")]
        public string ElectricName
        {
            get { return _elename; }
            set { _elename = value; }
        }
        [Browsable(false), Category("UserSetting"), Description("型号名称"), DisplayName("光源亮度")]
        public LightsInten Intensity
        {
            get
            {
                if (_intensity == null) _intensity = new LightsInten();
                return _intensity;
            }
            set
            {
                _intensity = value;
            }
        }
        [Browsable(true), Category("UserSetting"), Description("延时参数"), DisplayName("延时参数")]
        public DelayTime Delaytime
        {
            get
            {
                if (_delaytime == null) _delaytime = new DelayTime();
                return _delaytime;
            }
            set
            {
                _delaytime = value;
            }
        }

        public override string ToString()
        {
            return "图片工程参数";
        }
    }
}
